/**
 * ajax
 */
import ajax from '../../ajax/ajax';

// 计数方法
export const GET_LIST = "GET_LIST";
export const DEL_LIST = "DEL_LIST";
export const AJAX_SEND = "AJAX_SEND";

const list = [{
            name: '科多',
            type: '英短',
            class: '猫',
            key: '1'
            }, {
            name: '萨满',
            type: '英短',
            class: '猫',
            key: '2'
            }, {
            name: '开心',
            type: '约克夏',
            class: '犬',
            key: '3'
        }];

export function getList(params) {
    return {
        type: GET_LIST,
        payload: list,
        meta: params
    }
}

export function delList(params) {
    return {
        type: DEL_LIST,
        meta: params
    }
}

export function testAjax(params) {
    return {
        type: AJAX_SEND,
        payload: ajax.post('https://ssl.inewhome.com/erp/acl/queryrule?g_tk=416499713&g_ty=erp',params),
        meta: params
    }
}
